Quantitative Metabarcoding

Author

Gled Guri

Published

March 13, 2025

0.1 Load the package and its dependencies

devtools::install_github("gledguri/QM",dependencies = TRUE, force = T )
library(QM)
load_QM_packages()

0.2 Load the data

# data(herring_qpcr);force(herring_qpcr)
data(cod_qpcr);force(cod_qpcr)
data(metabarcoding);force(metabarcoding)
cod_qpcr
    Well Sample_name         Species Sample_type           Ct   Plate Std_concentration
1     A1     Std-CH1 Clupea harengus    STANDARD  20.67928886 Plate_B             1e+06
2     B1     Std-CH2 Clupea harengus    STANDARD  24.28047562 Plate_B             1e+05
3     C1     Std-CH3 Clupea harengus    STANDARD  27.46961784 Plate_B             1e+04
4     D1     Std-CH4 Clupea harengus    STANDARD  30.63396072 Plate_B             1e+03
5     E1     Std-CH5 Clupea harengus    STANDARD    34.198452 Plate_B             1e+02
6     F1     Std-CH6 Clupea harengus    STANDARD  36.77652359 Plate_B             1e+01
7     G1     Std-CH7 Clupea harengus    STANDARD  39.35696793 Plate_B             1e+00
8     A2     Std-CH1 Clupea harengus    STANDARD  20.85572815 Plate_B             1e+06
9     B2     Std-CH2 Clupea harengus    STANDARD  24.01898384 Plate_B             1e+05
10    C2     Std-CH3 Clupea harengus    STANDARD  27.45393944 Plate_B             1e+04
11    D2     Std-CH4 Clupea harengus    STANDARD  30.65498352 Plate_B             1e+03
12    E2     Std-CH5 Clupea harengus    STANDARD  33.84698105 Plate_B             1e+02
13    F2     Std-CH6 Clupea harengus    STANDARD  36.84316635 Plate_B             1e+01
14    G2     Std-CH7 Clupea harengus    STANDARD Undetermined Plate_B             1e+00
15    A3  2021624_10 Clupea harengus     UNKNOWN  35.09906387 Plate_B                NA
16    B3   2021624_8 Clupea harengus     UNKNOWN  37.30815125 Plate_B                NA
17    C3  2021624_42 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
18    D3  2021624_30 Clupea harengus     UNKNOWN  39.82544708 Plate_B                NA
19    E3  2021624_14 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
20    F3  2021624_32 Clupea harengus     UNKNOWN  38.48879623 Plate_B                NA
21    H3  2021624_43 Clupea harengus     UNKNOWN  40.76032257 Plate_B                NA
22    A4  2021624_10 Clupea harengus     UNKNOWN  35.12607574 Plate_B                NA
23    B4   2021624_8 Clupea harengus     UNKNOWN  37.36190033 Plate_B                NA
24    C4  2021624_42 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
25    D4  2021624_30 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
26    E4  2021624_14 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
27    F4  2021624_32 Clupea harengus     UNKNOWN  37.62449646 Plate_B                NA
28    H4  2021624_43 Clupea harengus     UNKNOWN  39.57535172 Plate_B                NA
29    A5  2021624_18 Clupea harengus     UNKNOWN  37.13931656 Plate_B                NA
30    B5  2021624_40 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
31    C5  2021624_25 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
32    D5  2021624_22 Clupea harengus     UNKNOWN  38.31303406 Plate_B                NA
33    E5  2021624_15 Clupea harengus     UNKNOWN   36.2652626 Plate_B                NA
34    F5  2021624_44 Clupea harengus     UNKNOWN  45.76896667 Plate_B                NA
35    G5   2021624_5 Clupea harengus     UNKNOWN  36.17409515 Plate_B                NA
36    H5  2021624_16 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
37    A6  2021624_18 Clupea harengus     UNKNOWN  37.69597244 Plate_B                NA
38    B6  2021624_40 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
39    C6  2021624_25 Clupea harengus     UNKNOWN   41.2206459 Plate_B                NA
40    D6  2021624_22 Clupea harengus     UNKNOWN  39.17343903 Plate_B                NA
41    E6  2021624_15 Clupea harengus     UNKNOWN  37.38412094 Plate_B                NA
42    F6  2021624_44 Clupea harengus     UNKNOWN  42.63734436 Plate_B                NA
43    G6   2021624_5 Clupea harengus     UNKNOWN  36.24113846 Plate_B                NA
44    H6  2021624_16 Clupea harengus     UNKNOWN   39.2844696 Plate_B                NA
45    A7  2021624_27 Clupea harengus     UNKNOWN  39.76254654 Plate_B                NA
46    B7   2021624_4 Clupea harengus     UNKNOWN  41.51676178 Plate_B                NA
47    C7  2021624_11 Clupea harengus     UNKNOWN  35.69413757 Plate_B                NA
48    D7  2021624_26 Clupea harengus     UNKNOWN  37.39764404 Plate_B                NA
49    E7  2021624_41 Clupea harengus     UNKNOWN  38.89216232 Plate_B                NA
50    F7  2021624_29 Clupea harengus     UNKNOWN  40.97231674 Plate_B                NA
51    H7   2021624_6 Clupea harengus     UNKNOWN  37.86229324 Plate_B                NA
52    A8  2021624_27 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
53    B8   2021624_4 Clupea harengus     UNKNOWN  35.72262573 Plate_B                NA
54    C8  2021624_11 Clupea harengus     UNKNOWN  35.77841949 Plate_B                NA
55    D8  2021624_26 Clupea harengus     UNKNOWN  39.48923874 Plate_B                NA
56    E8  2021624_41 Clupea harengus     UNKNOWN  37.65555954 Plate_B                NA
57    F8  2021624_29 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
58    H8   2021624_6 Clupea harengus     UNKNOWN  39.03905869 Plate_B                NA
59    A9  2021624_33 Clupea harengus     UNKNOWN  39.78116608 Plate_B                NA
60    B9  2021624_17 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
61    C9  2021624_28 Clupea harengus     UNKNOWN  43.33337021 Plate_B                NA
62    D9  2021624_38 Clupea harengus     UNKNOWN  46.12921524 Plate_B                NA
63    E9   2021624_3 Clupea harengus     UNKNOWN   37.4945755 Plate_B                NA
64    F9  2021624_20 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
65    G9  2021624_19 Clupea harengus     UNKNOWN  41.06113434 Plate_B                NA
66    H9  2021624_36 Clupea harengus     UNKNOWN  40.08838272 Plate_B                NA
67   A10  2021624_33 Clupea harengus     UNKNOWN  39.83427429 Plate_B                NA
68   B10  2021624_17 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
69   C10  2021624_28 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
70   D10  2021624_38 Clupea harengus     UNKNOWN  39.83372116 Plate_B                NA
71   E10   2021624_3 Clupea harengus     UNKNOWN  36.97294617 Plate_B                NA
72   F10  2021624_20 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
73   G10  2021624_19 Clupea harengus     UNKNOWN  34.90359116 Plate_B                NA
74   H10  2021624_36 Clupea harengus     UNKNOWN  40.28865051 Plate_B                NA
75   A11  2021624_21 Clupea harengus     UNKNOWN  35.65264893 Plate_B                NA
76   B11  2021624_31 Clupea harengus     UNKNOWN  39.55165863 Plate_B                NA
77   D11   2021624_9 Clupea harengus     UNKNOWN   37.7012825 Plate_B                NA
78   E11  2021624_39 Clupea harengus     UNKNOWN  40.05196381 Plate_B                NA
79   G11   2021624_7 Clupea harengus     UNKNOWN  36.73715591 Plate_B                NA
80   A12  2021624_21 Clupea harengus     UNKNOWN  37.03312302 Plate_B                NA
81   B12  2021624_31 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
82   D12   2021624_9 Clupea harengus     UNKNOWN  38.43218613 Plate_B                NA
83   E12  2021624_39 Clupea harengus     UNKNOWN Undetermined Plate_B                NA
84   G12   2021624_7 Clupea harengus     UNKNOWN  36.23777771 Plate_B                NA
85    A1     Std-CH1 Clupea harengus    STANDARD  20.89475441 Plate_D             1e+06
86    B1     Std-CH3 Clupea harengus    STANDARD  27.75590706 Plate_D             1e+04
87    C1     Std-CH4 Clupea harengus    STANDARD  30.63160706 Plate_D             1e+03
88    D1     Std-CH5 Clupea harengus    STANDARD  34.11185837 Plate_D             1e+02
89    E1     Std-CH6 Clupea harengus    STANDARD  37.31342697 Plate_D             1e+01
90    F1     Std-CH7 Clupea harengus    STANDARD   38.6644249 Plate_D             1e+00
91    G1     Std-CH8 Clupea harengus    STANDARD  39.65521622 Plate_D             1e-01
92    A2     Std-CH1 Clupea harengus    STANDARD  21.04283905 Plate_D             1e+06
93    B2     Std-CH3 Clupea harengus    STANDARD  27.64603615 Plate_D             1e+04
94    C2     Std-CH4 Clupea harengus    STANDARD  30.80105972 Plate_D             1e+03
95    D2     Std-CH5 Clupea harengus    STANDARD  34.07408905 Plate_D             1e+02
96    E2     Std-CH6 Clupea harengus    STANDARD  38.12646866 Plate_D             1e+01
97    F2     Std-CH7 Clupea harengus    STANDARD   40.2918129 Plate_D             1e+00
98    G2     Std-CH8 Clupea harengus    STANDARD  39.65754318 Plate_D             1e-01
99    A3  2021624_37 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
100   C3  2020620_29 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
101   D3  2020620_32 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
102   E3  2020620_16 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
103   F3  2020620_03 Clupea harengus     UNKNOWN  38.66085434 Plate_D                NA
104   G3  2020620_12 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
105   H3  2020620_07 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
106   A4  2021624_37 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
107   C4  2020620_29 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
108   D4  2020620_32 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
109   E4  2020620_16 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
110   F4  2020620_03 Clupea harengus     UNKNOWN  40.42780304 Plate_D                NA
111   G4  2020620_12 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
112   H4  2020620_07 Clupea harengus     UNKNOWN  40.07585526 Plate_D                NA
113   A5  2020620_31 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
114   C5  2020620_28 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
115   E5  2020620_23 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
116   F5  2020620_22 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
117   G5  2020620_19 Clupea harengus     UNKNOWN  40.61782074 Plate_D                NA
118   H5  2020620_11 Clupea harengus     UNKNOWN  40.87185287 Plate_D                NA
119   A6  2020620_31 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
120   C6  2020620_28 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
121   E6  2020620_23 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
122   F6  2020620_22 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
123   G6  2020620_19 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
124   H6  2020620_11 Clupea harengus     UNKNOWN  41.73017502 Plate_D                NA
125   A7  2020620_15 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
126   B7  2020620_30 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
127   C7  2020620_27 Clupea harengus     UNKNOWN  40.10155106 Plate_D                NA
128   E7  2020620_20 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
129   F7  2020620_13 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
130   G7  2020620_04 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
131   H7  2020620_21 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
132   A8  2020620_15 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
133   B8  2020620_30 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
134   C8  2020620_27 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
135   E8  2020620_20 Clupea harengus     UNKNOWN  40.43481827 Plate_D                NA
136   F8  2020620_13 Clupea harengus     UNKNOWN  40.30215454 Plate_D                NA
137   G8  2020620_04 Clupea harengus     UNKNOWN  39.51931763 Plate_D                NA
138   H8  2020620_21 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
139   A9  2020620_06 Clupea harengus     UNKNOWN  38.23839951 Plate_D                NA
140   B9  2020620_05 Clupea harengus     UNKNOWN  40.26202011 Plate_D                NA
141   D9  2020620_14 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
142   E9  2020620_08 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
143   F9  2020620_24 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
144   G9  2019629_16 Clupea harengus     UNKNOWN  39.65792084 Plate_D                NA
145   H9  2019629_22 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
146  A10  2020620_06 Clupea harengus     UNKNOWN  37.93161774 Plate_D                NA
147  B10  2020620_05 Clupea harengus     UNKNOWN  39.57629776 Plate_D                NA
148  D10  2020620_14 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
149  E10  2020620_08 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
150  F10  2020620_24 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
151  G10  2019629_16 Clupea harengus     UNKNOWN  40.47380829 Plate_D                NA
152  H10  2019629_22 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
153  A11   2019629_7 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
154  B11  2019629_11 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
155  C11  2019629_15 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
156  D11   2019629_6 Clupea harengus     UNKNOWN  40.02921677 Plate_D                NA
157  E11  2019629_31 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
158  G11  2019629_32 Clupea harengus     UNKNOWN  39.20246887 Plate_D                NA
159  A12   2019629_7 Clupea harengus     UNKNOWN  39.85317612 Plate_D                NA
160  B12  2019629_11 Clupea harengus     UNKNOWN   40.6131897 Plate_D                NA
161  C12  2019629_15 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
162  D12   2019629_6 Clupea harengus     UNKNOWN   39.5435524 Plate_D                NA
163  E12  2019629_31 Clupea harengus     UNKNOWN Undetermined Plate_D                NA
164  G12  2019629_32 Clupea harengus     UNKNOWN  39.79040527 Plate_D                NA
165   A1     Std-CH1 Clupea harengus    STANDARD  21.07470703 Plate_E             1e+06
166   B1     Std-CH3 Clupea harengus    STANDARD  27.61070824 Plate_E             1e+04
167   C1     Std-CH4 Clupea harengus    STANDARD  30.86172676 Plate_E             1e+03
168   D1     Std-CH5 Clupea harengus    STANDARD  34.17502975 Plate_E             1e+02
169   E1     Std-CH6 Clupea harengus    STANDARD  38.08354187 Plate_E             1e+01
170   F1     Std-CH7 Clupea harengus    STANDARD Undetermined Plate_E             1e+00
171   G1     Std-CH8 Clupea harengus    STANDARD  44.88344574 Plate_E             1e-01
172   A2     Std-CH1 Clupea harengus    STANDARD   20.8622818 Plate_E             1e+06
173   B2     Std-CH3 Clupea harengus    STANDARD  27.53244209 Plate_E             1e+04
174   C2     Std-CH4 Clupea harengus    STANDARD  30.87360191 Plate_E             1e+03
175   D2     Std-CH5 Clupea harengus    STANDARD  34.01688004 Plate_E             1e+02
176   E2     Std-CH6 Clupea harengus    STANDARD  38.36595154 Plate_E             1e+01
177   F2     Std-CH7 Clupea harengus    STANDARD Undetermined Plate_E             1e+00
178   G2     Std-CH8 Clupea harengus    STANDARD Undetermined Plate_E             1e-01
179   A3  2019629_28 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
180   D3   2019629_4 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
181   E3  2019629_12 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
182   F3  2019629_29 Clupea harengus     UNKNOWN  40.07517242 Plate_E                NA
183   G3  2019629_21 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
184   A4  2019629_28 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
185   D4   2019629_4 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
186   E4  2019629_12 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
187   F4  2019629_29 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
188   G4  2019629_21 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
189   A5  2019629_28 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
190   D5   2019629_4 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
191   E5  2019629_12 Clupea harengus     UNKNOWN  40.28800583 Plate_E                NA
192   F5  2019629_29 Clupea harengus     UNKNOWN   40.9784584 Plate_E                NA
193   G5  2019629_21 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
194   A6  2019629_28 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
195   D6   2019629_4 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
196   E6  2019629_22 Clupea harengus     UNKNOWN  39.99228668 Plate_E                NA
197   F6  2019629_29 Clupea harengus     UNKNOWN   40.9406395 Plate_E                NA
198   G6  2019629_21 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
199   A7  2019629_14 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
200   B7  2019629_23 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
201   C7   2019629_8 Clupea harengus     UNKNOWN  40.81485748 Plate_E                NA
202   D7  2019629_20 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
203   E7  2019629_24 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
204   F7  2019629_19 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
205   G7   2019629_5 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
206   H7   2019629_3 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
207   A8  2019629_14 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
208   B8  2019629_23 Clupea harengus     UNKNOWN  39.60705566 Plate_E                NA
209   C8   2019629_8 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
210   D8  2019629_20 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
211   E8  2019629_24 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
212   F8  2019629_19 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
213   G8   2019629_5 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
214   H8   2019629_3 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
215   A9  2019629_14 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
216   B9  2019629_23 Clupea harengus     UNKNOWN  39.78777313 Plate_E                NA
217   C9   2019629_8 Clupea harengus     UNKNOWN  40.69521713 Plate_E                NA
218   D9  2019629_20 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
219   E9  2019629_24 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
220   F9  2019629_19 Clupea harengus     UNKNOWN  42.15032959 Plate_E                NA
221   G9   2019629_5 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
222   H9   2019629_3 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
223  A10  2019629_14 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
224  B10  2019629_22 Clupea harengus     UNKNOWN  45.96703339 Plate_E                NA
225  C10   2019629_8 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
226  D10   2019629_7 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
227  E10   2019629_7 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
228  F10  2019629_11 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
229  G10   2019629_5 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
230  H10   2019629_3 Clupea harengus     UNKNOWN  40.49952316 Plate_E                NA
231  A11  2019629_27 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
232  B11  2019629_27 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
233  C11  2019629_13 Clupea harengus     UNKNOWN  38.52088928 Plate_E                NA
234  D11  2019629_13 Clupea harengus     UNKNOWN  39.43684387 Plate_E                NA
235  E11  2019629_30 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
236  F11  2019629_30 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
237  G11  2019629_32 Clupea harengus     UNKNOWN  39.62968826 Plate_E                NA
238  A12  2019629_27 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
239  B12  2019629_11 Clupea harengus     UNKNOWN  40.35699081 Plate_E                NA
240  C12  2019629_13 Clupea harengus     UNKNOWN   38.6665802 Plate_E                NA
241  D12  2019629_15 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
242  E12  2019629_30 Clupea harengus     UNKNOWN Undetermined Plate_E                NA
243  F12  2019629_15 Clupea harengus     UNKNOWN  42.94013977 Plate_E                NA
244  G12  2019629_32 Clupea harengus     UNKNOWN  38.93134689 Plate_E                NA
245   A1     Std-CH1 Clupea harengus    STANDARD  21.23091507 Plate_F             1e+06
246   B1     Std-CH3 Clupea harengus    STANDARD  27.66345215 Plate_F             1e+04
247   C1     Std-CH4 Clupea harengus    STANDARD  31.19370461 Plate_F             1e+03
248   D1     Std-CH5 Clupea harengus    STANDARD   34.4101181 Plate_F             1e+02
249   E1     Std-CH6 Clupea harengus    STANDARD  37.87618256 Plate_F             1e+01
250   F1     Std-CH7 Clupea harengus    STANDARD  39.54518127 Plate_F             1e+00
251   G1     Std-CH8 Clupea harengus    STANDARD  40.39379883 Plate_F             1e-01
252   A2     Std-CH1 Clupea harengus    STANDARD  21.11040688 Plate_F             1e+06
253   B2     Std-CH3 Clupea harengus    STANDARD   27.6223526 Plate_F             1e+04
254   C2     Std-CH4 Clupea harengus    STANDARD  31.78951645 Plate_F             1e+03
255   E2     Std-CH6 Clupea harengus    STANDARD  37.73504639 Plate_F             1e+01
256   F2     Std-CH7 Clupea harengus    STANDARD  39.50231171 Plate_F             1e+00
257   G2     Std-CH8 Clupea harengus    STANDARD Undetermined Plate_F             1e-01
258   B3   2021624_7 Clupea harengus     UNKNOWN  34.95716476 Plate_F                NA
259   C3  2021624_37 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
260   F3  2020620_29 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
261   G3  2020620_32 Clupea harengus     UNKNOWN  39.50717545 Plate_F                NA
262   H3  2020620_16 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
263   B4   2021624_7 Clupea harengus     UNKNOWN  35.16669846 Plate_F                NA
264   C4  2021624_37 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
265   F4  2020620_29 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
266   G4  2020620_32 Clupea harengus     UNKNOWN  39.05901337 Plate_F                NA
267   H4  2020620_16 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
268   A5  2020620_03 Clupea harengus     UNKNOWN  38.81376648 Plate_F                NA
269   B5  2020620_12 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
270   C5  2020620_07 Clupea harengus     UNKNOWN  39.77295685 Plate_F                NA
271   D5  2020620_31 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
272   F5  2020620_28 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
273   H5  2020620_23 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
274   A6  2020620_03 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
275   B6  2020620_12 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
276   C6  2020620_07 Clupea harengus     UNKNOWN   40.1975174 Plate_F                NA
277   D6  2020620_31 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
278   F6  2020620_28 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
279   H6  2020620_23 Clupea harengus     UNKNOWN  40.87150955 Plate_F                NA
280   A7  2020620_22 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
281   B7  2020620_19 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
282   C7  2020620_11 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
283   D7  2020620_15 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
284   E7  2020620_30 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
285   F7  2020620_27 Clupea harengus     UNKNOWN  40.62250519 Plate_F                NA
286   H7  2020620_20 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
287   A8  2020620_22 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
288   B8  2020620_19 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
289   C8  2020620_11 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
290   D8  2020620_15 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
291   E8  2020620_30 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
292   F8  2020620_27 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
293   H8  2020620_20 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
294   A9  2020620_13 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
295   B9  2020620_04 Clupea harengus     UNKNOWN   39.4901123 Plate_F                NA
296   C9  2020620_21 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
297   D9  2020620_06 Clupea harengus     UNKNOWN   39.3844986 Plate_F                NA
298   E9  2020620_05 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
299   G9  2020620_14 Clupea harengus     UNKNOWN  40.98209763 Plate_F                NA
300   H9  2020620_08 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
301  A10  2020620_13 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
302  B10  2020620_04 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
303  C10  2020620_21 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
304  D10  2020620_06 Clupea harengus     UNKNOWN  38.73543549 Plate_F                NA
305  E10  2020620_05 Clupea harengus     UNKNOWN  40.19083786 Plate_F                NA
306  G10  2020620_14 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
307  H10  2020620_08 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
308  A11  2020620_24 Clupea harengus     UNKNOWN  39.64798737 Plate_F                NA
309  C11  2019629_16 Clupea harengus     UNKNOWN  39.21881485 Plate_F                NA
310  D11   2019629_6 Clupea harengus     UNKNOWN  39.18229294 Plate_F                NA
311  E11  2019629_31 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
312  G11     Std-CH2 Clupea harengus    STANDARD  24.00854683 Plate_F             1e+05
313  A12  2020620_24 Clupea harengus     UNKNOWN Undetermined Plate_F                NA
314  C12  2019629_16 Clupea harengus     UNKNOWN  39.65681458 Plate_F                NA
315  D12   2019629_6 Clupea harengus     UNKNOWN  38.50286484 Plate_F                NA
316  E12  2019629_31 Clupea harengus     UNKNOWN  39.46422195 Plate_F                NA
317  G12     Std-CH2 Clupea harengus    STANDARD  24.46125603 Plate_F             1e+05
318   A1     Std-CH1 Clupea harengus    STANDARD   20.8891716 Plate_G             1e+06
319   B1     Std-CH3 Clupea harengus    STANDARD  27.59408188 Plate_G             1e+04
320   C1     Std-CH4 Clupea harengus    STANDARD  30.84783363 Plate_G             1e+03
321   D1     Std-CH5 Clupea harengus    STANDARD  33.88689423 Plate_G             1e+02
322   E1     Std-CH6 Clupea harengus    STANDARD   37.4319191 Plate_G             1e+01
323   F1     Std-CH7 Clupea harengus    STANDARD  40.76457977 Plate_G             1e+00
324   G1     Std-CH8 Clupea harengus    STANDARD Undetermined Plate_G             1e-01
325   A2     Std-CH1 Clupea harengus    STANDARD  20.89135551 Plate_G             1e+06
326   B2     Std-CH3 Clupea harengus    STANDARD  27.26293373 Plate_G             1e+04
327   C2     Std-CH4 Clupea harengus    STANDARD  30.70213699 Plate_G             1e+03
328   D2     Std-CH5 Clupea harengus    STANDARD   33.9912262 Plate_G             1e+02
329   E2     Std-CH6 Clupea harengus    STANDARD  37.77001572 Plate_G             1e+01
330   F2     Std-CH7 Clupea harengus    STANDARD Undetermined Plate_G             1e+00
331   G2     Std-CH8 Clupea harengus    STANDARD Undetermined Plate_G             1e-01
332   A3  2021624_10 Clupea harengus     UNKNOWN   36.4125824 Plate_G                NA
333   B3   2021624_8 Clupea harengus     UNKNOWN   36.8061676 Plate_G                NA
334   C3  2021624_42 Clupea harengus     UNKNOWN  41.33824921 Plate_G                NA
335   D3  2021624_30 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
336   E3  2021624_14 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
337   F3  2021624_32 Clupea harengus     UNKNOWN  38.21615219 Plate_G                NA
338   H3  2021624_43 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
339   A4  2021624_10 Clupea harengus     UNKNOWN  42.56510544 Plate_G                NA
340   B4   2021624_8 Clupea harengus     UNKNOWN  37.29789734 Plate_G                NA
341   C4  2021624_42 Clupea harengus     UNKNOWN  41.87237549 Plate_G                NA
342   D4  2021624_30 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
343   E4  2021624_14 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
344   F4  2021624_32 Clupea harengus     UNKNOWN  38.64439011 Plate_G                NA
345   H4  2021624_43 Clupea harengus     UNKNOWN  41.30338287 Plate_G                NA
346   A5  2021624_18 Clupea harengus     UNKNOWN  36.34432983 Plate_G                NA
347   B5  2021624_40 Clupea harengus     UNKNOWN  40.30106735 Plate_G                NA
348   C5  2021624_25 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
349   D5  2021624_22 Clupea harengus     UNKNOWN  39.94377136 Plate_G                NA
350   E5  2021624_15 Clupea harengus     UNKNOWN  36.63824081 Plate_G                NA
351   F5  2021624_44 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
352   G5   2021624_5 Clupea harengus     UNKNOWN  35.89820862 Plate_G                NA
353   H5  2021624_16 Clupea harengus     UNKNOWN  39.48892212 Plate_G                NA
354   A6  2021624_18 Clupea harengus     UNKNOWN    36.157547 Plate_G                NA
355   B6  2021624_40 Clupea harengus     UNKNOWN  38.20215607 Plate_G                NA
356   C6  2021624_25 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
357   D6  2021624_22 Clupea harengus     UNKNOWN  40.01337814 Plate_G                NA
358   E6  2021624_15 Clupea harengus     UNKNOWN  36.47186279 Plate_G                NA
359   F6  2021624_44 Clupea harengus     UNKNOWN  39.98491669 Plate_G                NA
360   G6   2021624_5 Clupea harengus     UNKNOWN  37.07023621 Plate_G                NA
361   H6  2021624_16 Clupea harengus     UNKNOWN  39.49610901 Plate_G                NA
362   A7  2021624_27 Clupea harengus     UNKNOWN  40.63593674 Plate_G                NA
363   B7   2021624_4 Clupea harengus     UNKNOWN  36.51871109 Plate_G                NA
364   C7  2021624_11 Clupea harengus     UNKNOWN  36.05905151 Plate_G                NA
365   D7  2021624_26 Clupea harengus     UNKNOWN  38.13557053 Plate_G                NA
366   E7  2021624_41 Clupea harengus     UNKNOWN  40.01876831 Plate_G                NA
367   F7  2021624_29 Clupea harengus     UNKNOWN  38.95786285 Plate_G                NA
368   H7   2021624_6 Clupea harengus     UNKNOWN  38.33583069 Plate_G                NA
369   A8  2021624_27 Clupea harengus     UNKNOWN  41.39300537 Plate_G                NA
370   B8   2021624_4 Clupea harengus     UNKNOWN  34.62062454 Plate_G                NA
371   C8  2021624_11 Clupea harengus     UNKNOWN  35.67477417 Plate_G                NA
372   D8  2021624_26 Clupea harengus     UNKNOWN  38.78547668 Plate_G                NA
373   E8  2021624_41 Clupea harengus     UNKNOWN  48.18703461 Plate_G                NA
374   F8  2021624_29 Clupea harengus     UNKNOWN  37.84211349 Plate_G                NA
375   H8   2021624_6 Clupea harengus     UNKNOWN   38.0619812 Plate_G                NA
376   A9  2021624_33 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
377   B9  2021624_17 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
378   C9  2021624_28 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
379   D9  2021624_38 Clupea harengus     UNKNOWN  39.81788254 Plate_G                NA
380   E9   2021624_3 Clupea harengus     UNKNOWN  38.02515411 Plate_G                NA
381   F9  2021624_20 Clupea harengus     UNKNOWN  39.84552002 Plate_G                NA
382   G9  2021624_19 Clupea harengus     UNKNOWN   36.2765274 Plate_G                NA
383   H9  2021624_36 Clupea harengus     UNKNOWN  47.17802429 Plate_G                NA
384  A10  2021624_33 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
385  B10  2021624_17 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
386  C10  2021624_28 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
387  D10  2021624_38 Clupea harengus     UNKNOWN  46.39860535 Plate_G                NA
388  E10   2021624_3 Clupea harengus     UNKNOWN  38.14785385 Plate_G                NA
389  F10  2021624_20 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
390  G10  2021624_19 Clupea harengus     UNKNOWN  34.93868637 Plate_G                NA
391  H10  2021624_36 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
392  A11  2021624_21 Clupea harengus     UNKNOWN  36.70544052 Plate_G                NA
393  B11  2021624_31 Clupea harengus     UNKNOWN  40.76830673 Plate_G                NA
394  D11   2021624_9 Clupea harengus     UNKNOWN  38.63124847 Plate_G                NA
395  E11  2021624_39 Clupea harengus     UNKNOWN  40.27198792 Plate_G                NA
396  F11     Std-CH7 Clupea harengus    STANDARD  37.97735214 Plate_G             1e+00
397  G11     Std-CH2 Clupea harengus    STANDARD  23.85812569 Plate_G             1e+05
398  A12  2021624_21 Clupea harengus     UNKNOWN  36.84037781 Plate_G                NA
399  B12  2021624_31 Clupea harengus     UNKNOWN Undetermined Plate_G                NA
400  D12   2021624_9 Clupea harengus     UNKNOWN  37.89494324 Plate_G                NA
401  E12  2021624_39 Clupea harengus     UNKNOWN  40.31898499 Plate_G                NA
402  F12     Std-CH7 Clupea harengus    STANDARD    38.828022 Plate_G             1e+00
403  G12     Std-CH2 Clupea harengus    STANDARD  24.03194427 Plate_G             1e+05
metabarcoding
# A tibble: 10 × 93
   Species                      sp_idx ini_conc Mock_1 Mock_2 Mock_3 Mock_4 Mock_5 Mock_6 `2019629_11` `2019629_15` `2019629_16` `2019629_22` `2019629_28` `2019629_31` `2019629_32` `2019629_6` `2019629_7` `2020620_03` `2020620_04` `2020620_05` `2020620_06` `2020620_07` `2020620_08` `2020620_11` `2020620_12` `2020620_13` `2020620_14` `2020620_15` `2020620_16` `2020620_19` `2020620_20` `2020620_21` `2020620_22` `2020620_23` `2020620_24` `2020620_27` `2020620_28` `2020620_29` `2020620_30` `2020620_31` `2020620_32` `2021624_10` `2021624_11` `2021624_14` `2021624_15` `2021624_16` `2021624_17` `2021624_18` `2021624_19` `2021624_20` `2021624_21` `2021624_22` `2021624_25` `2021624_26` `2021624_27` `2021624_28` `2021624_29` `2021624_3` `2021624_30` `2021624_31` `2021624_32` `2021624_33` `2021624_36` `2021624_37` `2021624_38` `2021624_39` `2021624_4` `2021624_40` `2021624_41` `2021624_42` `2021624_43` `2021624_44` `2021624_5` `2021624_6` `2021624_7` `2021624_8` `2021624_9` `2019629_12` `2019629_13` `2019629_14` `2019629_19` `2019629_20` `2019629_21` `2019629_23` `2019629_24` `2019629_27` `2019629_29` `2019629_3` `2019629_30` `2019629_4` `2019629_5` `2019629_8`
   <chr>                         <int>    <int>  <int>  <int>  <int>  <int>  <int>  <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>       <int>       <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>       <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>       <int>        <int>        <int>        <int>        <int>        <int>       <int>       <int>       <int>       <int>       <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>        <int>       <int>        <int>       <int>       <int>       <int>
 1 Brosme brosme                     1     6022  26537  26282  55800  37606  34698  82587            0            0            0            0            0            2            0           0           6            2         1782            0            2            0            0            0            2            0            2            0            0            2            0            0            2            0            0            0            0            0            2            0            0            0            0           10            2            0            6            0            0            2            0            0            2            0            2            2            4           0           10            0            4            0            2            0            0            0           0            0            0            6            0            0           0           0           0           2           2            0            0            1            0            0            0            7            2            0            0           2            0           0           1           0
 2 Cyclopterus lumpus                2    12061  63611  38494  80634  58797  37921  95245            2            0            0            2            0            0            0           0           0            4            2            0            2            4            0            0            0            6            0            8            0            0            0            0            4            0            0            0            0            2            4            0            0            2            4            0            0            0            2            0            0            0            2            0           12            4            0           10            0           4           22            4           30            2            2           10            2         6444           0            2            0         1114            0            0           0           0           2           8           2            0            3            6            1            3            0           12            1            1            1          18        90138           2           0           4
 3 Hippoglossoides platessoides      3     6812 103953  53527  96043  83638  50442 118507         8214            0            0         6890            2            0            2       13672           4        17624        20868            0         5686        10148         6574          350            0            6        22342            4         7552        24912            0        12842        17432            4           10         9522        34610        10024        27240        22970        10798           28            6        16172            0            0         8272         8308            8        13990            8         4340       244510       360158       113176       477728       233486       25768       510300       240732       543826        63728        85020         3722        20754        40130        3822         4332        15434        99374        30014        23738           0        1580        1512        5490       13680            1        10716        67511        20325         1203            1        13598            2         7871           18       21045        14509           9           6           3
 4 Leptoclinus maculatus             4     3725 228228 124488 237519 194652 107854 256737          160            0            0         6800            0            0            0        5240           0            4          848            0         3274          746            0            0            0            0            0            2            0            0            0            0          254            0            0            0            0            0         3020         5034            0            2            2            2            0            0            0            0            0            0            2            0         1336            0            0         5584            2        2046            0           66         1024            0         2312        18044            2         1430           0          582            0          724            0            0           0         294        3372           2           0            1            5        21640            5            4            2          218            2            1            2        2016        22234        5348           4           0
 5 Mallotus villosus                 5     9816  72751  35851  94465  58157  31141  90112        70304         3100            6            4           10            0           10        1372        6580          242         2040            4          256            0            0          210         5816          436        15670        10472            2          780            4            4        26074         4454        15910         1640         7958         3552        20624         6072            2         3432         4750        26782         1502          496            4            2           14         4004           14            4        48540        10376       239346        39828        12914          12         9548        15520        98442        16534         6886         3704            6         2534          12            4           10        12658            8            6           4        7354        5094          74        3270            5           11           13            3           10            0           11           73            2            6        9830         3047       40385         860         226
 6 Maurolicus muelleri               6     7087  99815  29082 130790 120742  58762 162580            0            0            0            0            2            0            0           0           2            2            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            2            0            0            2            0            0            0            0            0            0            0            0            0            0            0            0            0            2            2           0            0            0            0            0            0            0            0            0           2            0            0            2            0            0           0           0           4           0           0            0            0            1            3            0            0            3            0            0            0           1            0           0           3           1
 7 Myoxocephalus scorpius            7     8908  75120  44139  77521  70449  48500  91900            0            0            0            2            0            0            0           0           0            6            4            0            0            2           10            0            2            2            0            2            0            2            0            0            4            0            0            2            0            0            0            2            2            2            0            4            0            2            0            0            0            2            0            0            4            2            0            2            6           2           14            4           10            0            0            2            0            4           2            2            0           18            0            0           0           0           0           2           0            0            1            2            0            0            0            2            0            0            1           6            3           2           0           0
 8 Pholis gunnellus                  8     4477  66110  36235  58501  52223  38270  75811          100          694            0         2936            2          834            0        9916           0         2446         3070            4         3306         5562         1146            0            0         2218            4         5542         3176            0            0            4          556            0            0         2428            0         9314         1448         2034            4          824         6954           14         2866            0         1702            0            2            0            2            0         1194           14            6         3068          574        2410           16         1388         2508            4         1094         8266         5300         4572           0          734            0         2678            0            0           2         830        1420        7630        1884            0            0            1            0            0            0            0            0            0            1          12            3           1           0           0
 9 Pleuronectes platessa             9     2637  41550  19983  44716  44234  27283  63749            0            0            0            0            0            0            0           0           0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0            0           0            0            0            0            0            0            0            0            0           0            0            0            0            0            0           0           0           0           0           0            0            0            0            0            0            0            0            0            0            0           0            0           0           0           0
10 Zz_Gadus morhua                  10     5942  72763  56460 111345  82212  52685 112193         8514            8         1752         4462         5630         4822        26164       78346       50714        50744        17520         2622        32848        44932         2036          272        22108            0        25250            2            0        25320        16498         1482        12430        20104         7386         3100        12350            0        14652        11836            4        22106         5912        70490         4274         8420        17494         8180            8        25790        12904           14        30104        23940        13508        65144        11634       17790        88546        15530        49048            6        32758          694          186        18264        8326        18766         4664        79992            4         5492        1652       17274        8860        4160       48536            3            6        23677            0            5            0        11638         4592         7772        36686       18466        20476       29841           8           2

0.3 Run Model 1

Here we make use of the standard concentration to learn the parameters that link the known DNA concentration with observed Ct values (Y) and positive / negative qPCR amplification (Z)

\[ \begin{aligned} &\textbf{qPCR probability of detection model}\\ Z_{ij} &\sim \text{Bernoulli}(\theta_{i}) && \text{(1.1)} \\ \theta_{i} &= 1 - exp(-W_{i} \cdot \phi) && \text{(1.2)} \\ &\text{}\\ &\textbf{qPCR continuous model}\\ Y_{ij} &\sim \text{Normal}(\mu_{i}, \sigma_{i}) && \text{(2.1)} \\ \mu_{i} &= \beta0_{p} + \beta1 \cdot ln(C_{i}) && \text{(2.2)} \\ \sigma_{i} &= e^{(\gamma0 + \gamma1 \cdot ln(C_{i}))} && \text{(2.3)} \end{aligned} \]

M1 <- load_model('M1')
# Prepare the data for going into the model

stan_data_M1 <- prep_stan_M1(
   qpcr_data = cod_qpcr %>% filter(Sample_type=="STANDARD"),
   Ct = "Ct",
   standard_concentration = "Std_concentration",
   plate_index = 'Plate')
Plate index matches the total number of plates
# Run the model
M1_output <- Run_Model(stan_object = M1, stan_data = stan_data_M1)

0.4 Plot outputs of Model 1

extract_qpcr_param(M1_output) %>% as.tibble()
Warning: `as.tibble()` was deprecated in tibble 2.0.0.
ℹ Please use `as_tibble()` instead.
ℹ The signature and semantics have changed, see `?as_tibble`.
# A tibble: 9 × 11
  parameter         mean  se_mean     sd `2.5%`  `25%`  `50%`  `75%` `97.5%` n_eff  Rhat
  <chr>            <dbl>    <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>   <dbl> <dbl> <dbl>
1 logit_phi        3.25  0.0105   0.917   1.55   2.61   3.22   3.86    5.13  7596.  1.00
2 beta_0[Plate_B] 40.4   0.00292  0.148  40.1   40.3   40.4   40.5    40.7   2566.  1.00
3 beta_0[Plate_D] 40.6   0.00297  0.154  40.3   40.5   40.6   40.7    40.9   2688.  1.00
4 beta_0[Plate_E] 40.6   0.00295  0.154  40.3   40.5   40.6   40.7    40.9   2736.  1.00
5 beta_0[Plate_F] 40.8   0.00289  0.149  40.5   40.7   40.8   40.9    41.1   2674.  1.00
6 beta_0[Plate_G] 40.5   0.00281  0.148  40.2   40.4   40.5   40.6    40.8   2762.  1.00
7 beta_1          -1.42  0.000225 0.0111 -1.44  -1.43  -1.42  -1.41   -1.40  2430.  1.00
8 gamma_0          0.778 0.00109  0.0896  0.599  0.718  0.778  0.838   0.954 6793.  1.00
9 gamma_1         -0.233 0.000174 0.0133 -0.259 -0.242 -0.233 -0.224  -0.206 5817.  1.00
plot_qpcr_prob_det(M1_output)

plot_qpcr_cont_mod(M1_output)

plot_qpcr_curves(M1_output)

plot_qpcr_cont_mod_plate_specific(M1_output)

0.5 Run Model 2

M2 <- load_model('M2')
# Prepare the data for going into the model
stan_data_M2 <- prep_stan_M2(
    qpcr_data = cod_qpcr,
    sample_type = "Sample_type",
    Ct = "Ct",
    sample_name_column = "Sample_name",
    standard_concentration = "Std_concentration",
    plate_index = 'Plate')
Plate index matches the total number of plates
# Run the model
M2_output <- Run_Model(stan_object = M2, stan_data = stan_data_M2)

0.6 Plot outputs of Model 2

extract_qpcr_param(M2_output) %>% as_tibble()
# A tibble: 9 × 11
  parameter         mean  se_mean      sd `2.5%`  `25%`  `50%`  `75%` `97.5%`  n_eff  Rhat
  <chr>            <dbl>    <dbl>   <dbl>  <dbl>  <dbl>  <dbl>  <dbl>   <dbl>  <dbl> <dbl>
1 logit_phi        2.96  0.00766  0.934    1.27   2.29   2.91   3.58    4.88  14839.  1.00
2 beta_0[Plate_B] 40.4   0.00192  0.124   40.2   40.3   40.4   40.5    40.7    4202.  1.00
3 beta_0[Plate_D] 40.6   0.00197  0.130   40.4   40.5   40.6   40.7    40.9    4372.  1.00
4 beta_0[Plate_E] 40.6   0.00196  0.130   40.4   40.5   40.6   40.7    40.9    4418.  1.00
5 beta_0[Plate_F] 40.7   0.00195  0.126   40.5   40.7   40.7   40.8    41.0    4204.  1.00
6 beta_0[Plate_G] 40.5   0.00194  0.124   40.2   40.4   40.5   40.5    40.7    4105.  1.00
7 beta_1          -1.42  0.000147 0.00923 -1.44  -1.43  -1.42  -1.41   -1.40   3925.  1.00
8 gamma_0          0.686 0.000489 0.0565   0.576  0.648  0.685  0.723   0.799 13360.  1.00
9 gamma_1         -0.227 0.000115 0.0122  -0.250 -0.236 -0.228 -0.219  -0.203 11171.  1.00
extract_est_conc(M2_output) %>% as_tibble()
# A tibble: 84 × 5
   sample_index Sample_name C_est_log `C_est_log_2.5%CI` `C_est_log_97.5%CI`
          <dbl> <chr>           <dbl>              <dbl>               <dbl>
 1            1 2019629_11     -0.198             -1.51               0.821 
 2            2 2019629_12     -0.733             -2.78               0.666 
 3            3 2019629_13      1.36               0.304              2.24  
 4            4 2019629_14     -3.36              -7.46              -0.656 
 5            5 2019629_15     -1.35              -3.33               0.0593
 6            6 2019629_16      0.999              0.107              1.77  
 7            7 2019629_19     -0.995             -3.02               0.398 
 8            8 2019629_20     -3.19              -7.24              -0.437 
 9            9 2019629_21     -3.36              -7.41              -0.628 
10           10 2019629_22     -1.02              -2.44               0.0909
# ℹ 74 more rows
plot_qpcr_curves(M2_output)

plot_qpcr_prob_det(M2_output)

plot_qpcr_cont_mod(M2_output)

plot_qpcr_cont_mod_plate_specific(M2_output)

plot_est_conc(M2_output)

0.7 Run Model 3

M3 <- load_model('M3')
# Trim metabarcoding data only for mock samples
moc_dat <- metabarcoding %>% select(Species,sp_idx,ini_conc,Mock_1:Mock_6)

# # Prepare the data for going into the model
stan_data_M3 <- prep_stan_M3(
    metabarcoding_data = moc_dat,
    mock_sequencing_columns = c('Mock_1','Mock_2','Mock_3','Mock_4','Mock_5','Mock_6'),
    mock_initial_concentration = 'ini_conc',
    species_index = 'sp_idx',
    species_names = 'Species',
    number_of_PCR = 43,
    alpha_magnitude = 0.1)

# Run the model
M3_output <- Run_Model(stan_object = M3, stan_data = stan_data_M3)

0.8 Plot outputs of Model 3

extract_amp_efficiecy(M3_output)
                        Species sp_idx        alpha alpha_2.5%_CI alpha_97.5%_CI
1                 Brosme brosme      1 -0.014625579  -0.014736350   -0.014515151
2            Cyclopterus lumpus      2 -0.022590595  -0.022692433   -0.022491628
3  Hippoglossoides platessoides      3 -0.002313743  -0.002405521   -0.002220404
4         Leptoclinus maculatus      4  0.030800660   0.030720600    0.030880518
5             Mallotus villosus      5 -0.017323146  -0.017422432   -0.017223673
6           Maurolicus muelleri      6  0.000791568   0.000702617    0.000880306
7        Myoxocephalus scorpius      7 -0.013584814  -0.013681136   -0.013488863
8              Pholis gunnellus      8 -0.002699755  -0.002802097   -0.002595820
9         Pleuronectes platessa      9  0.002552140   0.002437823    0.002667062
10              Zz_Gadus morhua     10  0.000000000   0.000000000    0.000000000
amp_eff_output_extract(M3_output)
                        Species    Pre-PCR   Post-PCR         ALR Post-PCR_est Post-PCR_est_2.5%_CI Post-PCR_est_97.5%_CI
1                 Brosme brosme 0.08923200 0.05556938  0.01337365   0.05556887           0.05550456            0.05563241
2            Cyclopterus lumpus 0.17871590 0.07901771  0.70793133   0.07901874           0.07895763            0.07907012
3  Hippoglossoides platessoides 0.10093796 0.10672923  0.13663999   0.10672958           0.10669318            0.10677313
4         Leptoclinus maculatus 0.05519582 0.24240363 -0.46697893   0.24240231           0.24244176            0.24236069
5             Mallotus villosus 0.14545023 0.08065732  0.50196793   0.08065832           0.08060478            0.08071252
6           Maurolicus muelleri 0.10501282 0.12690236  0.17621634   0.12690047           0.12687261            0.12692714
7        Myoxocephalus scorpius 0.13199579 0.08596141  0.40490397   0.08596208           0.08591597            0.08600682
8              Pholis gunnellus 0.06633870 0.06898988 -0.28309260   0.06899039           0.06893554            0.06905000
9         Pleuronectes platessa 0.03907419 0.05093104 -0.81240387   0.05093180           0.05086511            0.05099989
10              Zz_Gadus morhua 0.08804659 0.10283804  0.00000000   0.10283742           0.10320885            0.10246730
plot_amp_eff(M3_output)

0.9 Run Model 4

M4 <- load_model('M4')
# Get column names for mock samples and environmental samples
mock_columns <- metabarcoding %>% select(Mock_1:Mock_6) %>% names()
sample_columns <- metabarcoding %>% select(-all_of(mock_columns),-Species,-sp_idx,-ini_conc) %>% names()

# Prepare the data for going into the model
stan_data_M4 <- prep_stan_M4(
    metabarcoding_data = metabarcoding,
    mock_sequencing_columns = mock_columns,
    sample_sequencing_columns = sample_columns,
    mock_initial_concentration = 'ini_conc',
    species_index = 'sp_idx',
    species_names = 'Species',
    number_of_PCR = 43,
    alpha_magnitude = 0.1)
Warning: Using an external vector in selections was deprecated in tidyselect 1.1.0.
ℹ Please use `all_of()` or `any_of()` instead.
  # Was:
  data %>% select(mock_columns)

  # Now:
  data %>% select(all_of(mock_columns))

See <https://tidyselect.r-lib.org/reference/faq-external-vector.html>.
M4_output <- Run_Model(stan_object = M4, stan_data = stan_data_M4)
Warning: There were 1 divergent transitions after warmup. See
https://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup
to find out why this is a problem and how to eliminate them.
Warning: Examine the pairs() plot to diagnose sampling problems

0.10 Plot outputs of Model 4

extract_amp_efficiecy(M4_output)
                        Species sp_idx        alpha alpha_2.5%_CI alpha_97.5%_CI
1                 Brosme brosme      1 -0.014637120  -0.014746809   -0.014527068
2            Cyclopterus lumpus      2 -0.022601333  -0.022700178   -0.022502925
3  Hippoglossoides platessoides      3 -0.002323579  -0.002414593   -0.002231966
4         Leptoclinus maculatus      4  0.030790899   0.030712040    0.030869404
5             Mallotus villosus      5 -0.017332823  -0.017431290   -0.017233592
6           Maurolicus muelleri      6  0.000781350   0.000693773    0.000869730
7        Myoxocephalus scorpius      7 -0.013595913  -0.013691998   -0.013499636
8              Pholis gunnellus      8 -0.002710302  -0.002812885   -0.002607891
9         Pleuronectes platessa      9  0.002539397   0.002426231    0.002653054
10              Zz_Gadus morhua     10  0.000000000   0.000000000    0.000000000
amp_eff_output_extract(M4_output)
                        Species    Pre-PCR   Post-PCR         ALR Post-PCR_est Post-PCR_est_2.5%_CI Post-PCR_est_97.5%_CI
1                 Brosme brosme 0.08923200 0.05556938  0.01337365   0.05556354           0.05549950            0.05562806
2            Cyclopterus lumpus 0.17871590 0.07901771  0.70793133   0.07901390           0.07895964            0.07906605
3  Hippoglossoides platessoides 0.10093796 0.10672923  0.13663999   0.10672718           0.10668981            0.10676643
4         Leptoclinus maculatus 0.05519582 0.24240363 -0.46697893   0.24239765           0.24243944            0.24235013
5             Mallotus villosus 0.14545023 0.08065732  0.50196793   0.08065706           0.08060298            0.08071315
6           Maurolicus muelleri 0.10501282 0.12690236  0.17621634   0.12689554           0.12686985            0.12692455
7        Myoxocephalus scorpius 0.13199579 0.08596141  0.40490397   0.08595548           0.08590665            0.08600433
8              Pholis gunnellus 0.06633870 0.06898988 -0.28309260   0.06898673           0.06892828            0.06904415
9         Pleuronectes platessa 0.03907419 0.05093104 -0.81240387   0.05092429           0.05085799            0.05099132
10              Zz_Gadus morhua 0.08804659 0.10283804  0.00000000   0.10287862           0.10324586            0.10251182
plot_amp_eff(M4_output)

extract_ini_prop(M4_output)
                        Species   2019629_11  2019629_12   2019629_13   2019629_14   2019629_15   2019629_16   2019629_19   2019629_20   2019629_21   2019629_22   2019629_23   2019629_24   2019629_27   2019629_28   2019629_29    2019629_3   2019629_30   2019629_31   2019629_32    2019629_4    2019629_5    2019629_6    2019629_7    2019629_8   2020620_03   2020620_04   2020620_05   2020620_06   2020620_07   2020620_08   2020620_11   2020620_12   2020620_13   2020620_14   2020620_15   2020620_16   2020620_19   2020620_20   2020620_21   2020620_22   2020620_23   2020620_24   2020620_27   2020620_28   2020620_29   2020620_30   2020620_31   2020620_32   2021624_10   2021624_11   2021624_14   2021624_15   2021624_16   2021624_17   2021624_18   2021624_19   2021624_20   2021624_21   2021624_22   2021624_25   2021624_26   2021624_27   2021624_28   2021624_29    2021624_3   2021624_30   2021624_31   2021624_32   2021624_33   2021624_36   2021624_37   2021624_38   2021624_39    2021624_4   2021624_40   2021624_41   2021624_42   2021624_43   2021624_44    2021624_5    2021624_6    2021624_7    2021624_8    2021624_9
1                 Brosme brosme 1.426889e-06 0.002113711 3.317901e-06 1.694771e-05 5.770473e-06 9.688695e-05 4.152912e-07 2.738971e-05 0.0009700373 1.193725e-05 4.761108e-04 7.254712e-04 1.383623e-05 3.962764e-05 8.049728e-06 5.513443e-05 8.932468e-07 5.954420e-04 1.053607e-05 2.413209e-06 6.687260e-04 2.968365e-06 1.690147e-04 4.628143e-05 4.885828e-05 6.441580e-02 7.235638e-05 8.060099e-05 4.824106e-06 1.699480e-05 1.073396e-04 1.025042e-04 3.493296e-06 4.298751e-05 9.520752e-07 6.773327e-07 6.498709e-05 1.534423e-05 1.051110e-05 3.987335e-05 9.112636e-06 5.727220e-06 1.012094e-05 3.687313e-06 4.637320e-07 3.841091e-05 4.556444e-06 2.756904e-06 8.988617e-06 9.663661e-06 1.272318e-04 3.210450e-04 2.355435e-05 3.820250e-04 1.319960e-05 0.0009427114 7.104207e-05 1.955959e-05 1.075170e-05 8.743218e-06 6.309795e-07 5.407519e-06 5.280063e-06 2.393705e-05 5.244043e-06 2.752042e-05 7.759601e-07 8.447352e-06 3.665868e-07 2.507540e-05 5.455720e-06 3.670489e-06 2.906858e-06 1.809327e-05 1.067551e-05 9.594516e-06 4.952411e-05 9.211967e-07 7.038276e-06 1.080336e-04 7.339950e-06 1.016430e-05 1.783096e-04 4.934030e-05
2            Cyclopterus lumpus 2.903942e-05 0.002677227 5.600354e-04 1.472016e-04 7.495553e-06 1.339838e-04 5.983917e-05 4.847117e-03 0.0010094806 2.782961e-04 1.156639e-03 4.754898e-04 1.451668e-04 5.090406e-05 6.869660e-05 7.431310e-04 8.298411e-01 5.013693e-05 1.393928e-05 4.250852e-05 3.031220e-05 4.013827e-06 6.141984e-06 1.851777e-02 1.378530e-04 9.486608e-05 9.431014e-05 1.119834e-04 1.631224e-04 2.249953e-05 1.458999e-04 1.048849e-05 4.125236e-03 4.410251e-06 6.939588e-04 8.037352e-07 6.633613e-06 2.013061e-05 1.392817e-05 1.146554e-04 1.165842e-05 7.435873e-06 1.286328e-05 4.683611e-06 1.298536e-04 1.107629e-04 6.049127e-06 3.194166e-06 1.641744e-04 4.184251e-04 3.031376e-06 2.634606e-05 3.207168e-05 1.717999e-04 1.774627e-05 0.0012058067 7.456903e-06 3.755833e-04 1.367663e-05 7.729415e-05 2.269159e-05 5.396806e-07 3.809293e-05 1.092640e-06 2.026888e-04 8.566524e-05 3.187574e-05 9.130391e-05 3.877294e-05 3.490098e-05 9.524449e-04 1.521779e-04 1.881493e-01 2.401451e-05 1.992938e-04 1.304953e-05 1.321724e-02 1.188428e-06 8.922093e-06 1.351855e-04 9.831386e-06 2.001105e-04 1.074816e-03 6.911270e-05
3  Hippoglossoides platessoides 5.471239e-02 0.056959087 9.969524e-01 7.167597e-01 4.133041e-06 6.616685e-05 9.995498e-01 9.769082e-01 0.5476545245 4.427620e-01 5.608575e-01 4.262956e-04 5.279673e-01 3.618427e-04 5.351783e-04 3.688961e-01 5.584783e-02 2.236891e-05 8.119189e-05 8.369080e-05 3.330452e-03 1.387685e-01 6.656507e-05 5.593128e-03 2.649725e-01 4.442928e-01 4.564394e-05 1.419598e-01 1.791087e-01 6.851404e-01 3.520950e-01 4.955871e-06 1.744021e-03 2.976176e-01 1.356707e-04 7.002841e-01 5.051381e-01 9.642936e-06 9.048957e-01 2.205627e-01 1.445320e-04 2.643200e-04 5.312955e-01 5.677956e-01 3.815193e-01 3.320446e-01 4.732443e-01 9.989168e-01 1.013513e-03 2.706881e-04 1.233761e-01 1.309188e-05 1.534003e-05 3.199689e-01 5.287751e-01 0.1847042298 3.111394e-01 6.657458e-04 9.958816e-01 6.682836e-01 8.967378e-01 1.945364e-01 7.741421e-01 8.672167e-01 5.746299e-01 8.382974e-01 8.422621e-01 6.982833e-01 6.689806e-01 6.566974e-01 1.538740e-01 7.884418e-01 4.900233e-01 3.358016e-01 1.950128e-01 7.845881e-01 4.931946e-01 9.994414e-01 8.266389e-01 6.793822e-05 4.913481e-02 7.029818e-02 3.196690e-01 2.080354e-01
4         Leptoclinus maculatus 2.560678e-04 0.014998576 1.025760e-04 5.531671e-02 1.490575e-06 2.041827e-05 5.272736e-05 6.975362e-04 0.4426909542 1.051977e-01 2.163390e-03 1.071828e-04 1.570263e-05 7.243768e-06 1.429367e-05 8.505102e-03 2.060535e-02 7.113225e-06 1.969096e-06 1.222611e-02 5.236826e-04 1.280347e-02 8.816593e-07 1.337429e-05 1.424562e-05 4.344845e-03 1.412986e-05 1.967993e-02 3.169661e-03 3.382800e-06 2.297632e-05 1.508575e-06 1.064882e-06 5.858240e-07 1.495699e-05 2.219721e-07 9.572339e-07 2.902179e-06 2.131298e-06 7.720183e-04 1.670238e-06 1.060840e-06 1.957922e-06 7.036611e-07 1.476382e-07 8.862107e-03 2.497237e-02 7.458136e-07 1.723635e-05 2.137171e-05 3.653709e-06 3.814636e-06 4.616996e-06 1.675191e-06 2.515690e-06 0.0002335800 9.911517e-07 3.986867e-05 2.751467e-06 8.788229e-04 1.158558e-07 7.303106e-08 2.178082e-03 1.722039e-06 1.098519e-02 8.945112e-08 5.542672e-05 3.163381e-04 9.524958e-08 4.298121e-03 1.796386e-01 1.604645e-05 4.202650e-03 3.466166e-06 6.304498e-03 1.841628e-06 8.648470e-04 2.595089e-07 1.278538e-06 2.088557e-05 2.198964e-03 3.775453e-02 2.684358e-05 7.849908e-07
5             Mallotus villosus 8.930250e-01 0.788837927 1.856243e-03 2.587181e-04 8.926558e-01 6.806936e-03 2.237945e-04 1.460124e-02 0.0009925880 4.626004e-04 8.458492e-04 3.217093e-02 2.344923e-04 3.620088e-03 3.349086e-04 3.285355e-01 2.236468e-02 3.972634e-05 7.885776e-04 7.312263e-01 9.903868e-01 2.654893e-02 2.146380e-01 9.722882e-01 6.922982e-03 8.279297e-02 3.021526e-03 1.216584e-02 5.213320e-06 1.935690e-05 4.023462e-01 3.565776e-01 2.672050e-01 3.979506e-01 7.791333e-01 2.506468e-04 3.014915e-02 4.861543e-04 5.007671e-04 6.289930e-01 3.182055e-01 8.193021e-01 1.744181e-01 2.488897e-01 2.577868e-01 4.793595e-01 2.385125e-01 2.707569e-04 2.386398e-01 4.214140e-01 3.896551e-01 2.967825e-01 1.103051e-01 2.819491e-04 2.235895e-04 0.6319873990 1.697472e-01 2.240355e-03 1.548694e-03 2.529644e-01 4.926361e-02 7.844424e-01 1.230541e-01 9.145337e-02 5.013731e-04 2.990709e-02 1.035308e-01 2.410179e-01 3.308923e-01 1.013985e-01 2.920172e-01 4.071740e-04 5.899343e-02 1.965745e-03 3.275107e-04 9.423707e-04 1.197772e-01 4.734634e-04 3.803564e-04 4.702818e-03 4.362235e-01 4.516364e-01 8.172469e-03 9.480280e-02
6           Maurolicus muelleri 7.956116e-07 0.001446523 2.199219e-06 9.026786e-06 3.854556e-06 5.793288e-05 1.045628e-04 1.649920e-05 0.0007895078 6.922293e-06 1.036907e-04 2.555800e-05 8.025492e-06 3.194248e-04 4.440114e-06 1.468174e-05 5.291417e-07 2.156250e-05 5.874080e-06 1.402187e-06 1.355446e-03 1.630641e-06 2.935917e-05 1.195072e-03 2.578840e-05 2.855654e-06 4.218997e-05 3.723820e-06 2.646294e-06 9.678290e-06 6.453983e-05 4.368875e-06 2.465447e-06 1.868700e-06 6.356554e-07 4.551527e-07 2.835061e-06 8.592145e-06 6.644633e-06 1.667426e-06 5.117987e-06 3.022432e-06 5.486670e-06 2.082236e-06 3.177141e-07 2.020596e-05 2.627995e-06 1.779521e-06 6.075356e-05 5.267311e-06 1.254928e-06 1.121282e-05 1.477163e-05 4.928488e-06 7.714055e-06 0.0005801829 3.024024e-06 1.061444e-05 6.899036e-06 3.935688e-07 3.534387e-07 2.282758e-07 2.755172e-06 6.152806e-06 2.952399e-06 2.603707e-07 4.637716e-07 1.951543e-07 2.353608e-07 1.135535e-06 3.045327e-06 2.215776e-06 1.641795e-06 1.446503e-04 6.008697e-06 5.506644e-06 8.457199e-06 6.038114e-07 3.934151e-06 5.969217e-05 4.187933e-06 1.562541e-04 6.107312e-06 2.319399e-06
7        Myoxocephalus scorpius 1.334642e-06 0.002110831 9.598786e-05 3.247770e-05 5.610530e-06 8.964782e-05 4.053883e-07 2.615464e-05 0.0009295225 1.874396e-04 1.238948e-04 4.430695e-05 1.354634e-05 3.736389e-05 4.667574e-05 1.654343e-04 1.775421e-05 3.524258e-05 1.024486e-05 2.938732e-05 2.285037e-05 2.917568e-06 4.400405e-06 4.322683e-05 1.421253e-04 1.328762e-04 6.832569e-05 6.173763e-06 5.508378e-05 1.637282e-03 1.074035e-04 9.831580e-05 7.588651e-04 3.179923e-06 9.700788e-05 6.094641e-07 6.170055e-05 1.487658e-05 1.043507e-05 7.828048e-05 8.967714e-06 5.300519e-06 1.631191e-04 3.460170e-06 4.438409e-07 2.656901e-06 6.264578e-05 2.308078e-04 1.104803e-04 8.623652e-06 4.821233e-05 1.879496e-05 3.481740e-04 8.674365e-06 1.257098e-05 0.0009090415 6.793266e-05 1.802717e-05 1.065067e-05 1.705561e-05 7.666936e-06 3.761488e-07 5.051356e-06 3.495551e-05 6.831444e-05 3.686515e-05 2.178620e-05 2.048750e-05 3.706102e-07 1.917161e-06 1.182142e-04 3.551317e-06 7.578386e-05 2.637840e-04 1.378562e-04 9.431251e-06 1.432807e-04 8.836824e-07 6.362886e-06 1.051321e-04 7.046026e-06 9.737966e-06 1.730107e-04 4.008185e-06
8              Pholis gunnellus 6.742196e-04 0.001577689 2.373508e-06 1.024967e-05 1.064372e-01 6.584288e-05 3.167318e-07 1.958508e-05 0.0008148289 1.917786e-01 5.916719e-06 2.942136e-05 8.813937e-06 3.677036e-04 2.963866e-05 2.101098e-04 1.127577e-05 1.625941e-01 6.725581e-06 9.364502e-06 1.722213e-05 1.023219e-01 3.147821e-06 3.351764e-05 3.738422e-02 6.644686e-02 1.613087e-03 8.391007e-02 9.981354e-02 1.213764e-01 7.568223e-05 5.083540e-06 7.260834e-01 5.246107e-05 2.198577e-01 2.994527e-01 3.289339e-06 1.018061e-05 2.698293e-04 7.147479e-03 5.852781e-06 3.605092e-06 1.377042e-01 2.436660e-06 3.605503e-01 1.793940e-02 4.259452e-02 3.287278e-04 3.052354e-02 3.290193e-01 1.073623e-04 3.020709e-01 1.610035e-05 6.692154e-02 8.871503e-06 0.0398593823 3.519125e-06 1.646126e-04 7.522506e-06 3.316288e-03 3.483256e-05 1.014692e-05 5.054846e-03 2.166111e-03 5.465438e-02 2.651902e-05 4.936978e-03 3.273131e-03 3.792361e-05 8.589301e-03 3.474699e-01 2.046323e-01 5.676034e-02 1.201360e-05 3.359382e-02 6.456430e-06 1.351163e-02 6.783362e-07 4.600438e-06 1.207044e-03 2.623566e-02 6.715531e-02 4.516436e-01 2.913781e-02
9         Pleuronectes platessa 7.550277e-07 0.001306791 1.996447e-06 1.367716e-06 3.446784e-06 5.373024e-05 2.756766e-07 1.586329e-05 0.0007679579 6.538880e-06 4.784159e-06 2.333675e-05 7.529946e-06 2.071991e-05 4.187849e-06 2.234135e-06 4.935231e-07 1.962429e-05 5.596687e-06 1.299416e-06 1.429930e-05 1.602398e-06 2.523401e-06 2.954117e-05 2.251505e-06 2.638678e-06 3.764786e-05 3.475288e-06 2.485173e-06 9.448537e-06 6.249498e-05 4.128385e-06 2.389623e-06 1.797247e-06 6.329472e-07 4.228624e-07 2.720637e-06 8.092130e-06 6.123208e-06 1.500264e-06 4.725967e-06 3.019232e-06 5.334619e-06 1.986929e-06 3.084504e-07 1.477587e-06 2.423745e-06 1.643085e-06 4.714757e-06 4.952331e-06 1.143476e-06 1.064821e-05 1.271962e-05 4.920185e-06 6.958770e-06 0.0005792732 2.961776e-06 9.864107e-06 6.726322e-06 3.719510e-07 3.192891e-07 2.105274e-07 2.434944e-07 4.278235e-07 2.873703e-06 2.480274e-07 4.336309e-07 1.898823e-07 2.322339e-07 1.066567e-06 3.085777e-06 2.048020e-06 1.524667e-06 9.648066e-06 5.774272e-06 4.992747e-06 7.709123e-07 5.691438e-07 3.652151e-06 5.713867e-05 3.845075e-06 5.284803e-06 6.136400e-06 2.175982e-06
10              Zz_Gadus morhua 5.129894e-02 0.127971639 4.228308e-04 2.274476e-01 8.751715e-04 9.926085e-01 7.829030e-06 2.840446e-03 0.0033805982 2.593080e-01 4.342623e-01 9.659720e-01 4.715856e-01 9.951751e-01 9.989539e-01 2.928725e-01 7.131007e-02 8.366147e-01 9.990753e-01 2.563775e-01 3.650209e-03 7.195440e-01 7.850800e-01 2.239900e-03 6.903492e-01 3.374735e-01 9.949908e-01 7.420784e-01 7.176747e-01 1.917646e-01 2.449725e-01 6.431910e-01 7.409626e-05 3.043245e-01 6.522393e-05 9.300370e-06 4.645696e-01 9.994241e-01 9.428393e-02 1.422888e-01 6.816029e-01 1.804044e-01 1.563834e-01 1.832957e-01 1.205526e-05 1.616209e-01 2.205981e-01 2.428111e-04 7.294568e-01 2.488277e-01 4.866770e-01 4.007417e-01 8.892276e-01 6.122536e-01 4.709318e-01 0.1389983932 5.189564e-01 9.964558e-01 2.510685e-03 7.445303e-02 5.393198e-02 2.100420e-02 9.551946e-02 3.909554e-02 3.589471e-01 1.316184e-01 4.915936e-02 5.698871e-02 4.911444e-05 2.289526e-01 2.591808e-02 6.338997e-03 2.017892e-01 6.617569e-01 7.644017e-01 2.144186e-01 3.592325e-01 8.003164e-05 1.729449e-01 9.935361e-01 4.861748e-01 3.727740e-01 2.190497e-01 6.678963e-01
bar_plot_est_ini_prop(M4_output)

heatmap_plot_est_ini_prop(M4_output)

0.11 Run Model 5

M5 <- load_model('M5')
mock_columns <- metabarcoding %>% select(Mock_1:Mock_6) %>% names()
sample_columns <- metabarcoding %>% select(-all_of(mock_columns),-Species,-sp_idx,-ini_conc) %>% names()

# qpcr <- qpcr %>% filter(qpcr$Sample_name%in%sample_columns|qpcr$Sample_type=='STANDARD')

stan_data_M5 <- prep_stan_M5(
    qpcr_data = cod_qpcr,
    sample_type = "Sample_type",
    Ct = "Ct",
    sample_name_column = "Sample_name",
    standard_concentration = "Std_concentration",
    plate_index = 'Plate',
    metabarcoding_data = metabarcoding,
    mock_sequencing_columns = mock_columns,
    sample_sequencing_columns = sample_columns,
    mock_initial_concentration = 'ini_conc',
    species_index = 'sp_idx',
    species_names = 'Species',
    number_of_PCR = 43,
    alpha_magnitude = 0.1)

M5_output <- Run_Model(stan_object = M5, stan_data = stan_data_M5,
                                             treedepth = 12,iterations = 2000,warmup = 1000)

0.12 Plot outputs of Model 5

extract_amp_efficiecy(M5_output)
                        Species sp_idx        alpha alpha_2.5%_CI alpha_97.5%_CI
1                 Brosme brosme      1 -0.014632546  -0.014743197   -0.014520084
2            Cyclopterus lumpus      2 -0.022597376  -0.022700414   -0.022495473
3  Hippoglossoides platessoides      3 -0.002318253  -0.002411883   -0.002225424
4         Leptoclinus maculatus      4  0.030795895   0.030717400    0.030876177
5             Mallotus villosus      5 -0.017328376  -0.017429810   -0.017225877
6           Maurolicus muelleri      6  0.000785499   0.000695353    0.000875927
7        Myoxocephalus scorpius      7 -0.013592639  -0.013689874   -0.013496474
8              Pholis gunnellus      8 -0.002706073  -0.002811375   -0.002599341
9         Pleuronectes platessa      9  0.002543134   0.002425491    0.002659690
10              Zz_Gadus morhua     10  0.000000000   0.000000000    0.000000000
amp_eff_output_extract(M5_output)
                        Species    Pre-PCR   Post-PCR         ALR Post-PCR_est Post-PCR_est_2.5%_CI Post-PCR_est_97.5%_CI
1                 Brosme brosme 0.08923200 0.05556938  0.01337365   0.05556493           0.05550254            0.05563059
2            Cyclopterus lumpus 0.17871590 0.07901771  0.70793133   0.07901377           0.07895090            0.07907124
3  Hippoglossoides platessoides 0.10093796 0.10672923  0.13663999   0.10673329           0.10669151            0.10676925
4         Leptoclinus maculatus 0.05519582 0.24240363 -0.46697893   0.24240808           0.24247094            0.24235894
5             Mallotus villosus 0.14545023 0.08065732  0.50196793   0.08065863           0.08060000            0.08071936
6           Maurolicus muelleri 0.10501282 0.12690236  0.17621634   0.12689638           0.12686571            0.12692602
7        Myoxocephalus scorpius 0.13199579 0.08596141  0.40490397   0.08595282           0.08590585            0.08599411
8              Pholis gunnellus 0.06633870 0.06898988 -0.28309260   0.06898743           0.06892582            0.06905194
9         Pleuronectes platessa 0.03907419 0.05093104 -0.81240387   0.05092372           0.05085126            0.05099288
10              Zz_Gadus morhua 0.08804659 0.10283804  0.00000000   0.10286095           0.10323548            0.10248569
plot_amp_eff(M5_output)

extract_ini_prop(M5_output)
                        Species   2019629_11   2019629_12   2019629_13   2019629_14   2019629_15   2019629_16   2019629_19   2019629_20   2019629_21   2019629_22   2019629_23   2019629_24   2019629_27   2019629_28   2019629_29    2019629_3   2019629_30   2019629_31   2019629_32    2019629_4    2019629_5    2019629_6    2019629_7    2019629_8   2020620_03   2020620_04   2020620_05   2020620_06   2020620_07   2020620_08   2020620_11   2020620_12   2020620_13   2020620_14   2020620_15   2020620_16   2020620_19   2020620_20   2020620_21   2020620_22   2020620_23   2020620_24   2020620_27   2020620_28   2020620_29   2020620_30   2020620_31   2020620_32   2021624_10   2021624_11   2021624_14   2021624_15   2021624_16   2021624_17   2021624_18   2021624_19   2021624_20   2021624_21   2021624_22   2021624_25   2021624_26   2021624_27   2021624_28   2021624_29    2021624_3   2021624_30   2021624_31   2021624_32   2021624_33   2021624_36   2021624_37   2021624_38   2021624_39    2021624_4   2021624_40   2021624_41   2021624_42   2021624_43   2021624_44    2021624_5    2021624_6    2021624_7    2021624_8    2021624_9
1                 Brosme brosme 9.231328e-07 0.0011427398 1.109676e-06 1.914366e-05 3.713895e-06 0.0010544566 3.897425e-07 2.211078e-05 0.0008740736 1.048687e-05 7.976465e-04 0.0046725932 1.609239e-05 1.976386e-04 8.371236e-05 7.240862e-05 7.247218e-07 2.384857e-03 1.712053e-04 2.271091e-06 6.480539e-04 5.548855e-06 6.058870e-04 2.197117e-05 1.358643e-04 9.325875e-02 0.0006716699 2.638360e-04 9.643028e-06 1.298402e-05 7.633059e-05 2.258024e-04 2.874744e-06 5.515015e-05 1.296591e-06 8.496453e-07 1.065417e-04 1.262792e-04 7.445685e-06 4.308530e-05 1.600087e-05 4.162812e-06 6.832783e-06 2.911686e-06 7.786072e-07 4.282720e-05 4.393500e-06 1.092268e-06 1.525076e-05 4.397822e-06 2.163654e-04 4.762222e-04 8.719058e-05 7.800645e-04 1.089257e-05 2.744056e-04 1.275719e-04 0.0005200549 3.924198e-06 8.891326e-06 3.440963e-07 5.249819e-06 5.574269e-06 2.426955e-05 4.144574e-06 3.080475e-05 5.670260e-07 8.606541e-06 1.811894e-07 2.954514e-05 4.892406e-06 2.411785e-06 2.213747e-06 2.458335e-05 2.339317e-05 7.838391e-06 7.101183e-05 4.202874e-07 5.398323e-06 0.0020926588 7.377291e-06 5.833390e-06 2.129321e-04 1.346655e-04
2            Cyclopterus lumpus 2.893868e-05 0.0014526557 5.429246e-04 1.789371e-04 4.605607e-06 0.0013470430 5.905755e-05 4.820781e-03 0.0009432168 3.367035e-04 1.955146e-03 0.0028625999 2.241106e-04 2.516229e-04 9.852501e-04 9.915835e-04 8.798919e-01 1.266158e-04 2.245502e-04 5.127834e-05 2.557674e-05 7.037919e-06 1.390276e-05 1.826730e-02 3.897365e-04 1.324019e-04 0.0007958808 3.660542e-04 4.852930e-04 1.936584e-05 9.624621e-05 1.567667e-05 4.096604e-03 4.322186e-06 6.961140e-04 9.280038e-07 7.925701e-06 1.731860e-04 1.016913e-05 1.268661e-04 1.994371e-05 5.563158e-06 8.895189e-06 3.979230e-06 1.354873e-04 1.251120e-04 5.899112e-06 1.256016e-06 5.219968e-04 5.316745e-04 3.767244e-06 1.582197e-05 1.120723e-04 3.388896e-04 1.371456e-05 3.195234e-04 8.478974e-06 0.0224087600 4.569077e-06 8.135347e-05 2.343311e-05 3.188852e-07 4.107419e-05 6.919556e-07 3.001989e-04 9.657978e-05 3.260883e-05 9.652012e-05 3.731795e-05 4.172281e-05 9.666192e-04 1.485683e-04 2.313747e-01 3.056934e-05 6.662718e-04 1.035581e-05 1.930359e-02 4.599764e-07 7.177950e-06 0.0028639138 9.736121e-06 2.913288e-04 1.341647e-03 1.846913e-04
3  Hippoglossoides platessoides 5.739960e-02 0.0591106412 9.974110e-01 8.798905e-01 2.812307e-06 0.0006949681 9.995516e-01 9.779517e-01 0.5437172088 5.602985e-01 9.505813e-01 0.0027840038 9.089327e-01 2.460801e-03 8.506037e-03 4.948839e-01 5.921695e-02 6.373084e-05 2.141683e-03 1.060011e-04 3.317856e-03 4.507055e-01 2.349839e-04 5.602139e-03 7.706407e-01 6.437931e-01 0.0004254249 5.060990e-01 5.539920e-01 8.090176e-01 4.506031e-01 8.432865e-06 1.725823e-03 4.093700e-01 1.376728e-04 7.003405e-01 8.721931e-01 8.390971e-05 9.815605e-01 2.468296e-01 3.718642e-04 3.143906e-04 6.198139e-01 6.734162e-01 3.814954e-01 3.773228e-01 5.713282e-01 9.991728e-01 3.490544e-03 3.474778e-04 2.101856e-01 8.257763e-06 5.186450e-05 6.620654e-01 9.878052e-01 2.132570e-01 5.890346e-01 0.0424524344 9.983392e-01 7.135827e-01 9.463422e-01 1.984067e-01 8.388650e-01 9.003607e-01 8.853638e-01 9.509925e-01 8.817610e-01 7.391249e-01 6.690098e-01 8.146584e-01 1.558116e-01 7.923837e-01 6.026339e-01 9.546887e-01 6.843464e-01 9.724287e-01 7.199504e-01 9.995232e-01 9.730341e-01 0.0014024785 9.324476e-02 1.113475e-01 4.070425e-01 5.969492e-01
4         Leptoclinus maculatus 2.685486e-04 0.0154740240 1.001022e-04 6.789936e-02 9.822955e-07 0.0002289443 5.249389e-05 6.886773e-04 0.4466264679 1.331693e-01 3.658504e-03 0.0006814030 2.452363e-05 4.033831e-05 2.160663e-04 1.140689e-02 2.185191e-02 2.015759e-05 3.361930e-05 1.558047e-02 5.225070e-04 4.156629e-02 2.282468e-06 8.169454e-06 4.026100e-05 6.294769e-03 0.0001349348 7.017410e-02 9.804245e-03 3.035557e-06 1.833298e-05 2.558317e-06 9.884908e-07 5.906098e-07 1.538689e-05 2.760748e-07 1.107441e-06 2.690296e-05 1.805307e-06 8.645602e-04 3.006724e-06 8.881745e-07 1.422847e-06 6.014362e-07 2.278460e-07 1.007602e-02 3.013100e-02 3.713811e-07 5.593475e-05 2.546238e-05 6.118064e-06 2.825763e-06 1.899182e-05 2.706775e-06 2.317376e-06 9.245725e-05 1.422043e-06 0.0023664908 1.098926e-06 9.383983e-04 6.954009e-08 5.171119e-08 2.361161e-03 1.702827e-06 1.692223e-02 7.397476e-08 5.787380e-05 3.351190e-04 5.432879e-08 5.332693e-03 1.818751e-01 1.589282e-05 5.170384e-03 5.514966e-06 2.214343e-02 1.561257e-06 1.262514e-03 1.266512e-07 1.069423e-06 0.0005221141 4.168597e-03 5.985655e-02 3.117407e-05 1.370053e-06
5             Mallotus villosus 9.366511e-01 0.8911316536 1.838843e-03 3.148473e-04 8.931736e-01 0.1391465566 2.247379e-04 1.460120e-02 0.0010464545 5.791923e-04 1.420910e-03 0.2150665196 3.854396e-04 2.556298e-02 5.213338e-03 4.406051e-01 2.370100e-02 1.025234e-04 2.240068e-02 9.320014e-01 9.915443e-01 8.617252e-02 7.733786e-01 9.744316e-01 2.012994e-02 1.200096e-01 0.0489884680 4.340205e-02 1.014409e-05 1.673207e-05 5.146484e-01 8.216253e-01 2.674329e-01 5.474171e-01 7.790708e-01 2.564779e-04 5.206632e-02 6.045653e-03 5.308308e-04 7.038735e-01 8.372772e-01 9.814690e-01 2.033825e-01 2.953120e-01 2.577484e-01 5.448111e-01 2.880268e-01 2.560705e-04 8.262359e-01 5.593032e-01 6.637943e-01 4.907575e-01 7.349540e-01 5.770461e-04 3.731479e-04 7.379191e-01 3.214645e-01 0.1439414221 1.511717e-03 2.701287e-01 5.197986e-02 8.000600e-01 1.333571e-01 9.497190e-02 7.682887e-04 3.392738e-02 1.083929e-01 2.551112e-01 3.309079e-01 1.258429e-01 2.956117e-01 4.042128e-04 7.250264e-02 5.559912e-03 1.125566e-03 1.167851e-03 1.748785e-01 4.655028e-04 4.491832e-04 0.2731719391 8.273859e-01 7.157941e-01 1.038742e-02 2.721225e-01
6           Maurolicus muelleri 6.122922e-07 0.0008358142 7.330208e-07 1.025128e-05 2.472606e-06 0.0006193005 1.049031e-04 1.428636e-05 0.0008702222 6.232405e-06 1.689891e-04 0.0001188307 8.453381e-06 2.206719e-03 4.521407e-05 1.821761e-05 4.555005e-07 5.631234e-05 1.001120e-04 1.331799e-06 1.369336e-03 3.505193e-06 9.846532e-05 1.152894e-03 6.947972e-05 2.783688e-06 0.0004028071 7.565824e-06 5.272880e-06 8.900136e-06 5.094927e-05 6.862683e-06 2.057415e-06 1.832541e-06 8.902273e-07 6.034747e-07 3.530920e-06 7.312513e-05 5.091502e-06 1.393993e-06 9.300330e-06 2.513077e-06 4.114617e-06 1.900362e-06 5.056138e-07 2.218560e-05 2.557974e-06 7.671202e-07 1.914358e-04 2.633492e-06 1.600283e-06 7.006321e-06 5.215854e-05 7.227828e-06 6.069695e-06 1.876097e-04 3.943503e-06 0.0003191068 2.492845e-06 3.285099e-07 2.208746e-07 1.522786e-07 2.897430e-06 5.907588e-06 2.255573e-06 2.237913e-07 3.052321e-07 1.189827e-07 1.159010e-07 1.073972e-06 2.844391e-06 1.514837e-06 1.205482e-06 3.811355e-04 1.346592e-05 4.614520e-06 1.188923e-05 2.671089e-07 3.218463e-06 0.0013130313 4.200075e-06 2.345300e-04 3.691113e-06 3.831369e-06
7        Myoxocephalus scorpius 9.283214e-07 0.0011383979 7.990572e-05 3.845392e-05 3.697051e-06 0.0010061824 3.779877e-07 2.180657e-05 0.0009379749 2.338537e-04 2.030457e-04 0.0001850928 1.485474e-05 1.789333e-04 6.515749e-04 2.174598e-04 1.846659e-05 9.519271e-05 1.571258e-04 3.636810e-05 2.013991e-05 5.330622e-06 1.088567e-05 2.287011e-05 4.047770e-04 1.903277e-04 0.0006808943 1.313029e-05 1.617569e-04 1.932943e-03 7.331210e-05 2.157600e-04 7.453805e-04 3.141526e-06 9.762543e-05 8.531458e-07 1.039629e-04 1.301774e-04 8.168124e-06 8.683647e-05 1.537446e-05 4.069093e-06 1.811759e-04 3.015155e-06 7.597662e-07 2.528599e-06 7.277302e-05 2.162053e-04 3.549245e-04 4.318943e-06 8.018893e-05 1.284706e-05 2.172678e-03 1.360537e-05 1.032458e-05 2.619207e-04 1.223030e-04 0.0005459828 3.643066e-06 1.792546e-05 7.420865e-06 2.446600e-07 5.346781e-06 3.561893e-05 9.661458e-05 4.186876e-05 2.223267e-05 2.141223e-05 1.559962e-07 1.770078e-06 1.163574e-04 2.564736e-06 9.010034e-05 6.750228e-04 4.622202e-04 7.686286e-06 2.075252e-04 3.701289e-07 5.552154e-06 0.0021066871 6.980364e-06 6.349787e-06 1.964946e-04 6.126631e-06
8              Pholis gunnellus 7.073850e-04 0.0009421676 8.527532e-07 1.208836e-05 1.065450e-01 0.0006675563 2.916935e-07 1.658781e-05 0.0007387880 2.428385e-01 6.045862e-06 0.0001347253 1.057481e-05 2.489185e-03 4.299586e-04 2.791829e-04 1.172417e-05 6.970308e-01 1.066057e-04 1.127688e-05 1.481266e-05 3.324034e-01 7.523196e-06 1.673779e-05 1.086840e-01 9.625899e-02 0.0263265185 2.992975e-01 3.088218e-01 1.433820e-01 5.170567e-05 8.225250e-06 7.259374e-01 6.999709e-05 2.198156e-01 2.993823e-01 3.830081e-06 8.489872e-05 2.840381e-04 7.991522e-03 1.074359e-05 2.634048e-06 1.605791e-01 2.012087e-06 3.605791e-01 2.039522e-02 5.145762e-02 3.198137e-04 1.057358e-01 4.366714e-01 1.815301e-04 4.995610e-01 6.417296e-05 1.384807e-01 7.061197e-06 4.307048e-02 4.470847e-06 0.0096648053 2.731853e-06 3.540110e-03 3.615543e-05 1.023186e-05 5.475414e-03 2.249796e-03 8.414753e-02 2.983176e-05 5.167819e-03 3.464518e-03 3.723172e-05 1.064626e-02 3.518990e-01 2.057027e-01 6.982387e-02 1.755589e-05 1.177266e-01 4.991293e-06 1.972749e-02 2.795105e-07 3.679254e-06 0.0663468207 4.979935e-02 1.063592e-01 5.753887e-01 8.361283e-02
9         Pleuronectes platessa 5.592892e-07 0.0007931227 7.269535e-07 1.239840e-06 2.449073e-06 0.0006320063 2.740094e-07 1.298539e-05 0.0007673267 6.109238e-06 5.062898e-06 0.0001146153 8.894788e-06 1.103989e-04 4.482459e-05 2.235123e-06 3.945160e-07 5.041187e-05 9.209418e-05 1.209279e-06 1.232471e-05 3.120689e-06 6.426380e-06 1.477733e-05 4.184026e-06 2.536065e-06 0.0003309937 6.941433e-06 5.094418e-06 7.627753e-06 4.966268e-05 7.007320e-06 1.929630e-06 1.647876e-06 7.940084e-07 5.371231e-07 3.304360e-06 7.184106e-05 4.646972e-06 1.311455e-06 8.170460e-06 2.329224e-06 4.016429e-06 1.799209e-06 4.706368e-07 1.232969e-06 2.498457e-06 8.203318e-07 8.805367e-06 2.630114e-06 1.590257e-06 7.658122e-06 5.110481e-05 8.178778e-06 6.000522e-06 1.786897e-04 3.504407e-06 0.0002881557 2.516068e-06 2.978328e-07 1.887380e-07 1.274901e-07 2.046417e-07 2.791849e-07 2.368933e-06 2.125700e-07 2.918481e-07 1.048296e-07 1.151630e-07 1.051900e-06 2.829804e-06 1.446574e-06 1.234517e-06 1.378747e-05 1.325324e-05 4.542471e-06 8.231413e-07 2.452327e-07 2.875731e-06 0.0013548026 3.824152e-06 3.557493e-06 3.171432e-06 3.396778e-06
10              Zz_Gadus morhua 4.941402e-03 0.0279787833 2.384253e-05 5.163521e-02 2.607046e-04 0.8546029858 5.840354e-06 1.849858e-03 0.0034782666 6.252107e-02 4.120337e-02 0.7733796164 9.037439e-02 9.665014e-01 9.838240e-01 5.152309e-02 1.530649e-02 3.000694e-01 9.745723e-01 5.220842e-02 2.525085e-03 8.912776e-02 2.256411e-01 4.614999e-04 9.950101e-02 4.005682e-02 0.9212424079 8.036981e-02 1.267047e-01 4.559885e-02 3.433193e-02 1.778844e-01 5.403268e-05 4.307619e-02 1.638795e-04 1.666335e-05 7.551035e-02 9.931840e-01 1.758734e-02 4.018130e-02 1.622684e-01 1.819449e-02 1.601804e-02 3.125561e-02 3.889041e-05 4.720103e-02 5.896820e-02 3.079430e-05 6.338942e-02 3.106819e-03 1.255289e-01 9.150814e-03 2.624357e-01 1.977262e-01 1.176531e-02 4.438857e-03 8.922918e-02 0.7774927872 1.281439e-04 1.170133e-02 1.610092e-03 1.516909e-03 1.988624e-02 2.349137e-03 1.239257e-02 1.488053e-02 4.564483e-03 1.837523e-03 7.083642e-06 4.344449e-02 1.370895e-02 1.336935e-03 1.839975e-02 3.860325e-02 1.734794e-01 2.636190e-02 6.458629e-02 9.100200e-06 2.648770e-02 0.6488255540 2.536929e-02 6.100970e-03 5.392254e-03 4.698138e-02
bar_plot_est_ini_prop(M5_output)

bar_plot_est_ini_prop(M4_output)

heatmap_plot_est_ini_prop(M5_output)

plot_est_ini_conc(M5_output)